export const NODE_TYPES = {
  START: 'start',
  END: 'end',
  TASK: 'task',
  CONDITION: 'condition',
  PARALLEL: 'parallel',
  SEQUENCE: 'sequence'
}

export const NODE_LABELS = {
  [NODE_TYPES.START]: '开始',
  [NODE_TYPES.END]: '结束',
  [NODE_TYPES.TASK]: '任务',
  [NODE_TYPES.CONDITION]: '条件',
  [NODE_TYPES.PARALLEL]: '并行',
  [NODE_TYPES.SEQUENCE]: '顺序'
}

export const NODE_CONFIGS = {
  [NODE_TYPES.START]: {
    width: 60,
    height: 60,
    radius: 30,
    fill: '#67C23A',
    stroke: '#67C23A',
    strokeWidth: 2,
    text: {
      fill: '#FFFFFF',
      fontSize: 14,
      fontWeight: 'bold'
    }
  },
  [NODE_TYPES.END]: {
    width: 60,
    height: 60,
    radius: 30,
    fill: '#F56C6C',
    stroke: '#F56C6C',
    strokeWidth: 2,
    text: {
      fill: '#FFFFFF',
      fontSize: 14,
      fontWeight: 'bold'
    }
  },
  [NODE_TYPES.TASK]: {
    width: 120,
    height: 60,
    radius: 8,
    fill: '#FFFFFF',
    stroke: '#409EFF',
    strokeWidth: 2,
    text: {
      fill: '#303133',
      fontSize: 14
    }
  },
  [NODE_TYPES.CONDITION]: {
    width: 120,
    height: 60,
    radius: 8,
    fill: '#FFFFFF',
    stroke: '#E6A23C',
    strokeWidth: 2,
    text: {
      fill: '#303133',
      fontSize: 14
    }
  },
  [NODE_TYPES.PARALLEL]: {
    width: 120,
    height: 60,
    radius: 8,
    fill: '#FFFFFF',
    stroke: '#909399',
    strokeWidth: 2,
    text: {
      fill: '#303133',
      fontSize: 14
    }
  },
  [NODE_TYPES.SEQUENCE]: {
    width: 120,
    height: 60,
    radius: 8,
    fill: '#FFFFFF',
    stroke: '#909399',
    strokeWidth: 2,
    text: {
      fill: '#303133',
      fontSize: 14
    }
  }
}

export const NODE_CATEGORIES = {
  control: '控制节点',
  action: '动作节点',
  advanced: '高级节点'
}

export const NODE_STYLES = {
  [NODE_TYPES.START]: {
    fill: '#e1f3d8',
    stroke: '#67C23A'
  },
  [NODE_TYPES.END]: {
    fill: '#fde2e2',
    stroke: '#F56C6C'
  },
  [NODE_TYPES.CONDITION]: {
    fill: '#fdf6ec',
    stroke: '#E6A23C'
  },
  [NODE_TYPES.ACTION]: {
    fill: '#ecf5ff',
    stroke: '#409EFF'
  },
  [NODE_TYPES.DELAY]: {
    fill: '#f5f7fa',
    stroke: '#909399'
  },
  [NODE_TYPES.SUBPROCESS]: {
    fill: '#f0f9eb',
    stroke: '#85ce61'
  }
}